package util.controller;


import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.xml.ws.RequestWrapper;

@Controller
public class TestredisController {

    StringRedisTemplate redisTempalte;

    @RequestMapping("/set")
    public void addstr(String key,String value){
        //.opsForxxx选择操作的类型
        redisTempalte.opsForValue().set(key, value);
    }
}
